div.page-title Manage Contributors
iron-ajax#GetAllNamespacesAjax(auto='[[shouldFetchAllNamespaces(isClusterAdmin)]]', url='/api/workgroup/get-all-namespaces',
    last-response='{{allNamespaces}}', on-error='onAllNamespaceFetchError', handle-as='json')
section#Main-Content
    article.Acct-Info
        h2
            iron-icon.icon(icon='kubeflow:account')
            span.text Account Information
        .content
            span [[user]]
            template(is='dom-if', if='[[isClusterAdmin]]')
                b(style="color: red;") &nbsp;(Cluster Admin)
    article.Namespaces
        h2
            iron-icon.icon(icon='kubeflow:namespace')
            span.text Profile Memberships
        .content.small
            template(is='dom-if', if='[[!hasNamespaces]]')
                span.text You don't have any namespace memberships.
            template(is='dom-if', if='[[hasNamespaces]]')
                vaadin-grid(items='[[nsBreakdown(ownedNamespaces, editNamespaces, viewNamespaces)]]', theme="material-grid no-border wrap-cell-content", height-by-rows, multi-sort)
                    vaadin-grid-column(path='0', header='Your Role')
                    vaadin-grid-column(path='1', flex-grow='2', header='Namespaces')
    template(is='dom-if', if='[[isClusterAdmin]]')
        article.Cluster-Namespaces
            h2
                iron-icon.icon(icon='kubeflow:namespace')
                span.text Profiles Overview (Cluster Admin)
            .content.small
                vaadin-grid(items='[[allNamespaces]]', theme="material-grid no-border wrap-cell-content", height-by-rows, multi-sort)
                    vaadin-grid-column(path='0', header='Namespace')
                    vaadin-grid-column(path='1', header='Owner')
                    vaadin-grid-column(path='2', flex-grow='2', header='Contributors')
    template(is='dom-if', if='[[ownedNamespaces.length]]')
        template(is='dom-repeat', items='[[ownedNamespaces]]' as='ownedNamespace')
            article.Contributors
                manage-users-view-contributor(owned-namespace='[[ownedNamespace]]')
paper-toast#AllNamespaceError(duration=5000)
    | Failed to fetch all namespaces, because:
    strong [[allNamespaceError]]
